﻿
set(NCTI_PROJECT ${NCTI_OCC_PLUGIN_DEMO})

add_definitions(
-D__TopoDS_DLL
-D__TopExp_DLL
-D__TopTools_DLL
-D__BRep_DLL
-D__BRepLProp_DLL
-D__BRepAdaptor_DLL
-D__BRepTools_DLL
-D__BinTools_DLL
-DUNICODE
-D_UNICODE
-D_CRT_SECURE_NO_WARNINGS
-D_CRT_NONSTDC_NO_DEPRECATE
-DHAVE_TK
-DCMAKE_INTDIR="Debug"
-DTKBRep_EXPORTS)
add_definitions(-DEXPORT_NCTI_DOC_OCC)
add_definitions(-DEXPORT_NCTI_GM_MODEL_PUBFUN)

include_directories(${INC_PATH_OCC})

FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_BASE})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_RENDER})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_PLUGINMANAGER})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_PLUGIN})
FUN_FIND_ALL_HEADFILE_DIR(${NCTI_GMDE_CPPSDK_INC} ${NCTI_GEOM_ENGINE})

FUN_FIND_ALL_HEADFILE_DIR(${CMAKE_CURRENT_SOURCE_DIR}/../${NCTI_PLUGIN_DEMO} "")
FUN_FIND_ALL_HEADFILE_DIR(${CMAKE_CURRENT_SOURCE_DIR} "")

file(GLOB_RECURSE project_cpps *.cpp *c *cc *.h *.hpp)
set(all_files_cpp ${project_cpps})
source_group_by_dir(all_files_cpp ${CMAKE_CURRENT_SOURCE_DIR})

link_directories(${LIB_PATH_NCTI})
link_directories(${LIB_PATH_OCC})

#DLL library
add_library(${NCTI_PROJECT} SHARED 
  ${all_files_cpp}
)

target_link_libraries(${NCTI_PROJECT}
  ${NCTI}
  ${NCTI_RENDER} 
  ${NCTI_BASE} 
  ${NCTI_PLUGINMANAGER}
  ${NCTI_PLUGIN}
  ${NCTI_OCC_STEP} 
  ${NCTI_OCC_STEP209} 
  ${NCTI_OCC_STEPBASE} 
  ${NCTI_OCC_XSBASE} 
  ${NCTI_OCC_IGES} 
  ${NCTI_OCC_XSBASE} 
  ${NCTI_OCC_FEAT}
  ${NCTI_OCC_BOOL} 
  ${NCTI_OCC_BO}
  ${NCTI_OCC_PRIM} 
  ${NCTI_OCC_FILLET}
  ${NCTI_OCC_OFFSET} 
  ${NCTI_OCC_MESH} 
  ${NCTI_OCC_SHHEALING}
  ${NCTI_OCC_HLR} 
  ${NCTI_OCC_TOPALGO}
  ${NCTI_OCC_GEOMALGO} 
  ${NCTI_OCC_BREP} 
  ${NCTI_OCC_GEOMBASE} 
  ${NCTI_OCC_G3D} 
  ${NCTI_OCC_G2D} 
  ${NCTI_OCC_MATH} 
  ${NCTI_OCC_KERNEL}
  ${NCTI_OCC_TKTOPTEST}
  ${NCTI_OCC_XDESTEP}
  ${NCTI_OCC_LCAF}
  ${NCTI_OCC_XCAF}
  ${NCTI_GEOM_ENGINE}
  ${NCTI_PLUGIN_DEMO}
)